﻿namespace etracks.Web
{
    using etracks.EntityModels;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;

    /// <summary>
    /// ViewModel used in ResourceController, Index action
    /// </summary>
    public class ResourceIndexViewModel
    {
        public int Resources { get; set; }
    }

    /// <summary>
    /// ViewModel used in ResourceController, List action
    /// </summary>
    public class ResourceListViewModel
    {
        public List<ResourceReadOnlyViewModel> ResourceList { get; set; }

        public ResourceListViewModel()
        {
            this.ResourceList = new List<ResourceReadOnlyViewModel>();
        }
    }

    /// <summary>
    /// ViewModel used in ResourceController, Search action
    /// </summary>
    public class ResourceSearchViewModel
    {
        public string Search_Term { get; set; }

        public List<Resource> ResourceList { get; set; }

        public ResourceSearchViewModel()
        {
            this.ResourceList = new List<Resource>();
        }
    }

    public class ResourceRegistrationViewModel : Resource 
    {
        public List<ResourceType> ResourceTypeList { get; set; }

    }

    public class ResourceReadOnlyViewModel : Resource
    {
        public string ResourceType { get; set; }
    }

}

